﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Freedom.Models.Entities;

namespace Freedom.Models.Interfaces
{
    /// <summary>
    /// 自由信息服务接口
    /// autor: Penn Yao
    /// </summary>
    interface IFreedomInfoService
    {
        /// <summary>
        /// 添加对象
        /// </summary>
        /// <param name="info">对象</param>
        void addInfo(tb_FreedomInfo info);

        /// <summary>
        /// 删除对象
        /// </summary>
        /// <param name="nID">ID</param>
        /// <returns></returns>
        bool deleteInfo(int nID);

        /// <summary>
        /// 更新对象
        /// </summary>
        /// <param name="info">对象</param>
        void updateInfo(tb_FreedomInfo info);

        /// <summary>
        /// 获取对象
        /// </summary>
        /// <param name="nID">ID</param>
        /// <returns></returns>
        tb_FreedomInfo getInfo(int nID);

        /// <summary>
        /// 获取所有对象
        /// </summary>
        /// <returns></returns>
        IQueryable<tb_FreedomInfo> getAllInfo();

        /// <summary>
        /// 保存
        /// </summary>
        void save();
    }
}
